home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / HTetris / htetris.jar / tetris / TetrisMIDlet.class (.txt) < prev   
Encoding:
Java Class File  |  2002-07-19  |  1.3 KB  |  38 lines

  1. package tetris;
  2.  
  3. import javax.microedition.lcdui.Display;
  4. import javax.microedition.midlet.MIDlet;
  5.  
  6. public class TetrisMIDlet extends MIDlet {
  7.    static TetrisMIDlet instance;
  8.    static MainMenu mainMenu;
  9.    private Splash splash = new Splash();
  10.    static Options options;
  11.    static GameScreen gameScreen;
  12.    static HighScores highScores;
  13.  
  14.    public TetrisMIDlet() {
  15.       instance = this;
  16.       mainMenu = new MainMenu();
  17.       options = new Options();
  18.       gameScreen = new GameScreen();
  19.       highScores = new HighScores();
  20.    }
  21.  
  22.    public void startApp() {
  23.       Display.getDisplay(this).setCurrent(this.splash);
  24.    }
  25.  
  26.    public void pauseApp() {
  27.    }
  28.  
  29.    public void destroyApp(boolean unconditional) {
  30.    }
  31.  
  32.    public static void quitApp() {
  33.       instance.destroyApp(true);
  34.       instance.notifyDestroyed();
  35.       instance = null;
  36.    }
  37. }
  38.